package com.wenyu.wenyuyuedu.wxapi;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.tencent.mm.sdk.openapi.IWXAPI;
import com.tencent.mm.sdk.openapi.WXAPIFactory;

public class AppRegister extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        final IWXAPI msgApi = WXAPIFactory.createWXAPI(context, "wx645768d32ba61b12", true);

        // 将该app注册到微信
        msgApi.registerApp("wx645768d32ba61b12");
    }
}
